package com.boarsoft.boar.entity;

/**
 * TODO 流程配置对象
 * 
 * @author Mac_J
 *
 */
public class FlowInfo {
	public static final short STATUS_NOUSE = 0;
	public static final short STATUS_INUSE = 1;
	public static final short STATUS_DRAFT = 2;

	public static final short TYPE_SRVC = 0;
	public static final short TYPE_FLOW = 1;

	/** 服务ID */
	private String id;
	/** 服务编号 */
	private String code;
	/** 服务名称 */
	private String name;
	/** 接口ID */
	private String faceId;
	/** 实现类 */
	private String impl;
	/** 实现类的版本 */
	private String ver;
	/** 状态 */
	private short status = STATUS_INUSE;
	/** 所属系统 */
	private String catalog;
	/** 是普通服务还是有流程的服务 */
	private short type = TYPE_FLOW;
	/** 访问路径 */
	private String url;
	/** 导出路径 */
	private String path;
	/** 服务描述 */
	private String memo;
	/** 引用接口 */
	private FaceInfo face;

	// ------------------

	@Override
	public String toString() {
		return new StringBuilder().append(catalog).append("/")//
				.append(type).append("/").append(id).toString();
	}

	// @Override
	// public boolean equals(Object o) {
	// if (o == null || !(o instanceof SvcInfo)) {
	// return false;
	// }
	// SvcInfo a = (SvcInfo) o;
	// if (a.code == null || this.code == null || Util.strIsEmpty(a.code) ||
	// Util.strIsEmpty(this.code)) {
	// return false;
	// }
	// return a.code.equals(this.code);
	// }

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFaceId() {
		return faceId;
	}

	public void setFaceId(String faceId) {
		this.faceId = faceId;
	}

	public String getVer() {
		return ver;
	}

	public void setVer(String ver) {
		this.ver = ver;
	}

	public String getImpl() {
		return impl;
	}

	public void setImpl(String impl) {
		this.impl = impl;
	}

	public short getStatus() {
		return status;
	}

	public void setStatus(short status) {
		this.status = status;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public short getType() {
		return type;
	}

	public void setType(short type) {
		this.type = type;
	}

	public FaceInfo getFace() {
		return face;
	}

	public void setFace(FaceInfo face) {
		this.face = face;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getCatalog() {
		return catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}
}